<% if @capabilites.length == 0 then %>
  <p>Não existe nenhuma capacidade registrada.</p>
<% else %>
  <table border="1">
  <thead>
      <tr>
        <td>Sigla</td>
        <td>Nome</td>
        <td>&nbsp;</td>
      </tr>
  </thead>
  <tbody>
      <% for capabilite in @capabilites %>
      <tr onmouseover="this.style.background='#DFDFFF'" onmouseout="this.style.background=''">
        <td><%=capabilite[:acronym]%></td>
        <td><%=capabilite[:name]%></td>
        <td style="width:55px">
              <%=link_to_remote( 
                        image_tag("/images/icons/alter.gif", :title => "alterar", :border => "0" ) , 
                        :url => { :action => "capabilite_form", :id => capabilite[:id], :act => "capabilite_alter" }, 
                        :loading => "TrackSuite.ajax.loadding('capabilite_list_action_#{capabilite[:id]}');",
                        :loaded => "TrackSuite.ajax.loaded.clear('capabilite_list_action_#{capabilite[:id]}');" 
              )%>
              <%=link_to_function( 
                        image_tag("/images/icons/remove.gif", :title => "remover", :border => "0" ),
                        "confirm('Atenção, deseja remover a capacidade #{capabilite[:name]}.','"+
                          remote_function(
                          :url => { :action => "capabilite_remove", :id => capabilite[:id] }, 
                          :loading => "TrackSuite.ajax.loadding('capabilite_list_action_#{capabilite[:id]}');",
                          :loaded => "TrackSuite.ajax.loaded.clear('capabilite_list_action_#{capabilite[:id]}');").gsub(/'/,"\\\\'") +"')"
              )%>
              <span id="capabilite_list_action_<%=capabilite[:id]%>">&nbsp;</span>
          </td>
      </tr>
      <% end %>
  </tbody>
  <tfoot>
      <tr>
          <td colspan="4" align="right">&nbsp;<%= will_paginate @capabilites, {:ajax => ajax} %></td>
      </tr>
  </tfoot>
  </table>
<% end %>